<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<title>学生管理系统-晴空</title>
	<link rel="stylesheet" href="<?php echo (HOME_CSS); ?>public.css">
	<link rel="stylesheet" href="<?php echo (HOME_CSS); ?>list.css">
	<script src="<?php echo (HOME_JS); ?>jquery.min.js"></script>
</head>
<body>
	<div id="header" class="header clearfix">
		<div class="logo left">
			晴空-学生管理系统
		</div>
		<ul class="header-nav right">
			<li>
				<a href="<?php echo U('Manager/login');?>">登陆</a>
			</li>
			<li>
				<a href="<?php echo U('Manager/logout');?>">退出系统</a>
			</li>
		</ul>
	</div>
	<div id="main-wrapper" class="clearfix">
		<div id="side" class="left">
			<ul>
				<h3>学生信息管理</h3>
				<?php if(strstr($auth_path, 'Student-showList') != false): ?><li><a href="<?php echo U('Student/showList');?>">查询学生信息</a></li><?php endif; ?>
				<?php if(strstr($auth_path, 'Student-addInfo') != false): ?><li><a href="<?php echo U('Student/addInfo');?>">录入学生信息</a></li><?php endif; ?>
			</ul>
			<ul>
				<h3>课程信息管理</h3>
				<?php if(strstr($auth_path, 'Course-showList') != false): ?><li><a href="<?php echo U('Course/showList');?>">查询课程</a></li><?php endif; ?>
				<?php if(strstr($auth_path, 'Course-addInfo') != false): ?><li><a href="<?php echo U('Course/addInfo');?>">录入课程</a></li><?php endif; ?>
			</ul>
			<ul>
				<h3>学生成绩管理</h3>
				<?php if(strstr($auth_path, 'Score-showList') != false): ?><li><a href="<?php echo U('Score/showList');?>">查询成绩</a></li><?php endif; ?>
				<?php if(strstr($auth_path, 'Score-addInfo') != false): ?><li><a href="<?php echo U('Score/addInfo');?>">录入成绩</a></li><?php endif; ?>
			</ul>
		</div>
		<div id="main" class="right">
			
<h1>查询课程安排信息</h1>
<div id="cont">
	<div class="table-head clearfix">
		<div class="wrap left">
			<span>班级：</span>
			<select name="" id="class-select" class="class-select">
				<?php if(is_array($class_info)): foreach($class_info as $key=>$v): ?><option value="<?php echo ($v["id"]); ?>" <?php echo ($v['id'] == $class_id ? 'selected' : ''); ?>><?php echo ($v["name"]); ?></option><?php endforeach; endif; ?>
			</select>
		</div>
		<a href="<?php echo U('Course/addInfo');?>" class="input-btn right">录入信息</a>
	</div>
	<table id="table" class="table">
		<tdead>
			<tr>
				<th>时间</th>
				<th>星期日</th>
				<th>星期一</th>
				<th>星期二</th>
				<th>星期三</th>
				<th>星期四</th>
				<th>星期五</th>
				<th>星期六</th>
			</tr>
		</tdead>
		<tbody>
			<tr>
				<td>8:00-8:40</td>
				<?php
 for($i = 0; $i <= 6; $i++) { echo '<td>' . getCourse($class_id, $i, 1) . '</td>'; } ?>
			</tr>
			<tr>
				<td>9:00-9:40</td>
				<?php
 for($i = 0; $i <= 6; $i++) { echo '<td>' . getCourse($class_id, $i, 2) . '</td>'; } ?>
			</tr>
			<tr>
				<td>10:00-10:40</td>
				<?php
 for($i = 0; $i <= 6; $i++) { echo '<td>' . getCourse($class_id, $i, 3) . '</td>'; } ?>
			</tr>
			<tr>
				<td>10:50-11:30</td>
				<?php
 for($i = 0; $i <= 6; $i++) { echo '<td>' . getCourse($class_id, $i, 4) . '</td>'; } ?>
			</tr>
			<tr>
				<td colspan="8" style="background: #ddd;height: 30px;"></td>
			</tr>
			<tr>
				<td>14:00-14:40</td>
				<?php
 for($i = 0; $i <= 6; $i++) { echo '<td>' . getCourse($class_id, $i, 5) . '</td>'; } ?>
			</tr>
			<tr>
				<td>15:00-15:40</td>
				<?php
 for($i = 0; $i <= 6; $i++) { echo '<td>' . getCourse($class_id, $i, 6) . '</td>'; } ?>
			</tr>
			<tr>
				<td>16:00-16:40</td>
				<?php
 for($i = 0; $i <= 6; $i++) { echo '<td>' . getCourse($class_id, $i, 7) . '</td>'; } ?>
			</tr>
			<tr>
				<td>16:50-17:30</td>
				<?php
 for($i = 0; $i <= 6; $i++) { echo '<td>' . getCourse($class_id, $i, 8) . '</td>'; } ?>
			</tr>
			<tr>
				<td colspan="8" style="background: #ddd;height: 30px;"></td>
			</tr>
			<tr>
				<td>19:00-19:40</td>
				<?php
 for($i = 0; $i <= 6; $i++) { echo '<td>' . getCourse($class_id, $i, 9) . '</td>'; } ?>
			</tr>
			<tr>
				<td>20:00-20:40</td>
				<?php
 for($i = 0; $i <= 6; $i++) { echo '<td>' . getCourse($class_id, $i, 10) . '</td>'; } ?>
			</tr>
			<tr>
				<td>20:50-21:30</td>
				<?php
 for($i = 0; $i <= 6; $i++) { echo '<td>' . getCourse($class_id, $i, 11) . '</td>'; } ?>
			</tr>
		</tbody>
	</table>
</div>
<script>
	$(function(){
		$('#class-select').change(function(){
			window.location.href = "<?php echo U('Course/showList');?>" + "?class_id=" + $(this).val();
		});
	});
</script>
		</div>
	</div>
	<div class="footer" id="footer">
		<div class="copyright">
			copyright ---- 晴空
		</div>
	</div>
</body>
</html>